package com.github.thinwonton.activemq.showcase;

import org.apache.activemq.ActiveMQConnectionFactory;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;

public class ActiveMQManager {

    private static ConnectionFactory connectionFactory;

    static {

        // connectionFactory = new ActiveMQConnectionFactory("admin", "123456", "tcp://192.168.88.18:61616");
        connectionFactory = new ActiveMQConnectionFactory("tcp://127.0.0.1:61616");
    }

    public static Connection createConnection() throws JMSException {
        return connectionFactory.createConnection();
    }
}
